# -*- coding: utf-8 -*-
# https://blog.csdn.net/weixin_52040868
# 公众号：测个der
# 微信：qing_an_an


import sys
from PyQt5.QtWidgets import *


class MyWin(QWidget):
    def __init__(self):
        super(MyWin, self).__init__()

        All_ = QHBoxLayout()
        hlayout = QHBoxLayout()
        vlayout = QVBoxLayout()
        glayout = QGridLayout()
        flayout = QFormLayout()

        hlayout.addWidget(QPushButton(str(1)))
        hlayout.addWidget(QPushButton(str(2)))

        vlayout.addWidget(QPushButton(str(3)))
        vlayout.addWidget(QPushButton(str(4)))


        glayout.addWidget(QPushButton(str(5)),0,1)
        glayout.addWidget(QPushButton(str(6)),1,1)

        flayout.addWidget(QPushButton(str(7)))
        flayout.addWidget(QPushButton(str(8)))

        hwg = QWidget()
        vwg = QWidget()
        gwg = QWidget()
        fwg = QWidget()

        hwg.setLayout(hlayout)
        vwg.setLayout(vlayout)
        gwg.setLayout(glayout)
        fwg.setLayout(flayout)

        All_.addWidget(hwg)
        All_.addWidget(vwg)
        All_.addWidget(gwg)
        All_.addWidget(fwg)

        self.setLayout(All_)

if __name__ == '__main__':
    app = QApplication(sys.argv)
    my = MyWin()
    my.show()
    sys.exit(app.exec_())